package cn.zymall.order.service;

import cn.zymall.common.model.Order;
import com.alipay.api.AlipayApiException;
import com.github.pagehelper.PageInfo;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.UnsupportedEncodingException;

/**
 * @program: mall
 * @description: 阿里支付业务层
 * @author: YueNiao
 * @email: 1486617253@qq.com
 * @create: 2020-08-18 21:50
 **/

public interface AliPayService  {
	/**
	 * 支付宝请求
	 * @param request
	 * @param response
	 * @param order
	 * @throws IOException
	 */
	public void toPay(HttpServletRequest request, HttpServletResponse response, Order order) throws IOException;

	/**
	 * 异步回调
	 * @param request
	 * @param response
	 * @throws Exception
	 */
	public void alipayNotify(HttpServletRequest request, HttpServletResponse response) throws Exception;

	/**
	 * 查询订单号
	 * @param id
	 * @return
	 * @throws AlipayApiException
	 */
	public boolean  search(String id) throws AlipayApiException;


}
